using System;
using Org.EasyWeb.Cache;
using Org.EasyWeb.Sys;

namespace Org.EasyWeb.Xml
{
    public class TransformAllRegCategory : XmlRegCategory
    {
        public const string REG_NAME = "TRANSFORMALL";

        public TransformAllRegCategory() : base(REG_NAME, @"TransformAll\", 
            typeof(TransformAllAttribute), typeof(ITransformAll))
        {
            RegBaseType = BaseType.Interface;

            AddXmlCache(TransformAllConfigCacheTable.REG_NAME, CachePosition.Application);
            AddConfigBaseClass(TransformAllConfigCacheTable.REG_NAME, "Single", typeof(XmlSingleTransform));
            AddConfigBaseClass(TransformAllConfigCacheTable.REG_NAME, "Frame", typeof(XmlFrameTransform));
       }

        public ITransformAll NewTransformAll(string regName) 
        {
            return (ITransformAll)NewInstance(regName);
        }
    }
}